#include <stdio.h>
#include "netopt.h"

int main(int ac,char** av){
	struct netopt* o = netopt(ac,av);
	if(!o){
		return 0;
	}
	if(*o->host){
		printf("host: '%s'\n",o->host);
	}else{
		printf("no host\n");
	}
	if(*o->user){
		printf("user: '%s'\n",o->user);
	}else{
		printf("no user\n");
	}
	if(*o->pass){
		printf("pass: '%s'\n",o->pass);
	}else{
		printf("no pass\n");
	}
	if(*o->log){
		printf("log: '%s'\n",o->log);
	}else{
		printf("no log\n");
	}
	if(*o->localhost){
		printf("localhost: '%s'\n",o->localhost);
	}else{
		printf("no localhost\n");
	}
	if(o->port){
		printf("port: %d\n",o->port);
	}else{
		printf("no port\n");
	}
	if(o->localport){
		printf("localport: %d\n",o->localport);
	}else{
		printf("no localport\n");
	}
	if(o->verbose){
		printf("verbose\n");
	}else{
		printf("no verbose\n");
	}
	if(o->last > 0){
		for(int i = o->last;i<ac;i++){
			printf("add: %s\n",av[i]);
		}
	}
	return 0;
}
